\hypertarget{classsc2_1_1_coordinator}{}\section{sc2\+:\+:Coordinator Class Reference}
\label{classsc2_1_1_coordinator}\index{sc2\+::\+Coordinator@{sc2\+::\+Coordinator}}


\hyperlink{classsc2_1_1_coordinator}{Coordinator} of one or more clients. Used to start, step and stop games and replays.  




{\ttfamily \#include $<$sc2\+\_\+coordinator.\+h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{classsc2_1_1_coordinator_ada059b9a60d901be047ef33ce612c5d2}{Load\+Settings} (int argc, char $\ast$$\ast$argv)
\item 
void \hyperlink{classsc2_1_1_coordinator_a555587bc85ac437711d15b569c75181a}{Set\+Multithreaded} (bool value)
\item 
void \hyperlink{classsc2_1_1_coordinator_a602e6ead93e360771ce36d6ac782fc2a}{Set\+Realtime} (bool value)
\item 
void \hyperlink{classsc2_1_1_coordinator_a7cea718f571effbe25b771315628c685}{Set\+Step\+Size} (int step\+\_\+size)
\item 
void \hyperlink{classsc2_1_1_coordinator_ad906656238e13a8bab21c46f50aecc3d}{Set\+Process\+Path} (const std\+::string \&path)
\item 
void \hyperlink{classsc2_1_1_coordinator_ac4071b2072ce3120b135c37c7e7587d1}{Set\+Data\+Version} (const std\+::string \&version)
\item 
void \hyperlink{classsc2_1_1_coordinator_aadbfd927d66314a4eb949b2de2ae37b4}{Set\+Timeout\+MS} (uint32\+\_\+t timeout\+\_\+ms=k\+Default\+Proto\+Interface\+Timeout)
\item 
void \hyperlink{classsc2_1_1_coordinator_aaad48921bac2f4f84471de5e9cff75d5}{Set\+Port\+Start} (int port\+\_\+start)
\item 
void \hyperlink{classsc2_1_1_coordinator_ab46aec5712f6ec8ef12b03854f6e0495}{Set\+Feature\+Layers} (const \hyperlink{structsc2_1_1_feature_layer_settings}{Feature\+Layer\+Settings} \&settings)
\item 
void \hyperlink{classsc2_1_1_coordinator_ace8a0630c6b61d28e81c94bbebad3d7d}{Set\+Render} (const \hyperlink{structsc2_1_1_render_settings}{Render\+Settings} \&settings)
\item 
void \hyperlink{classsc2_1_1_coordinator_a9b0eca71a6f7575f35d1dd5c3e5d73cf}{Set\+Window\+Size} (int width, int height)
\item 
void \hyperlink{classsc2_1_1_coordinator_a6e372788e11c3916fdf1982eb2e55511}{Set\+Window\+Location} (int x, int y)
\item 
void \hyperlink{classsc2_1_1_coordinator_a8aedd93ba1d7eb9e81b37b34ff76147c}{Set\+Use\+Generalized\+Ability\+Id} (bool value)
\item 
\mbox{\Hypertarget{classsc2_1_1_coordinator_aa59950d8ccb9d010288df3e1e6045eb9}\label{classsc2_1_1_coordinator_aa59950d8ccb9d010288df3e1e6045eb9}} 
void \hyperlink{classsc2_1_1_coordinator_aa59950d8ccb9d010288df3e1e6045eb9}{Add\+Command\+Line} (const std\+::string \&option)
\begin{DoxyCompactList}\small\item\em Appends a command line argument to be fed to Star\+Craft II when starting. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classsc2_1_1_coordinator_aed4bf1a5cf1519fc0488bc5d4641a582}\label{classsc2_1_1_coordinator_aed4bf1a5cf1519fc0488bc5d4641a582}} 
void \hyperlink{classsc2_1_1_coordinator_aed4bf1a5cf1519fc0488bc5d4641a582}{Set\+Participants} (const std\+::vector$<$ \hyperlink{structsc2_1_1_player_setup}{Player\+Setup} $>$ \&participants)
\begin{DoxyCompactList}\small\item\em Sets up the bots and whether they are controlled by in-\/built AI, human or a custom bot. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classsc2_1_1_coordinator_ac478d6f4c1b9e6c98514b7212c7997fc}\label{classsc2_1_1_coordinator_ac478d6f4c1b9e6c98514b7212c7997fc}} 
void {\bfseries Set\+Replay\+Recovery} (bool value)
\item 
\mbox{\Hypertarget{classsc2_1_1_coordinator_a16ebfba44b1abbc303770e4958922d05}\label{classsc2_1_1_coordinator_a16ebfba44b1abbc303770e4958922d05}} 
void \hyperlink{classsc2_1_1_coordinator_a16ebfba44b1abbc303770e4958922d05}{Add\+Replay\+Observer} (\hyperlink{classsc2_1_1_replay_observer}{Replay\+Observer} $\ast$replay\+\_\+observer)
\begin{DoxyCompactList}\small\item\em Add an instance of \hyperlink{classsc2_1_1_replay_observer}{Replay\+Observer}, each \hyperlink{classsc2_1_1_replay_observer}{Replay\+Observer} will run a separate Star\+Craft II client. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classsc2_1_1_coordinator_ac06566447119abac229fd671d39ff2ee}\label{classsc2_1_1_coordinator_ac06566447119abac229fd671d39ff2ee}} 
void \hyperlink{classsc2_1_1_coordinator_ac06566447119abac229fd671d39ff2ee}{Launch\+Starcraft} ()
\begin{DoxyCompactList}\small\item\em Uses settings gathered from Load\+Settings, specifically the path to the executable, to run Star\+Craft II. \end{DoxyCompactList}\item 
bool \hyperlink{classsc2_1_1_coordinator_a32ea6e639a39ec1fc813dffa2993d5b1}{Start\+Game} (const std\+::string \&map\+\_\+path=std\+::string())
\item 
bool \hyperlink{classsc2_1_1_coordinator_af70ba5246f9d447eb8a69cd76d364eee}{Update} ()
\item 
\mbox{\Hypertarget{classsc2_1_1_coordinator_af8ae051962776e946e457791f70bf6d2}\label{classsc2_1_1_coordinator_af8ae051962776e946e457791f70bf6d2}} 
void \hyperlink{classsc2_1_1_coordinator_af8ae051962776e946e457791f70bf6d2}{Leave\+Game} ()
\begin{DoxyCompactList}\small\item\em Requests for the currently running game to end. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classsc2_1_1_coordinator_a31058950f418aa5d488fbda684c02146}\label{classsc2_1_1_coordinator_a31058950f418aa5d488fbda684c02146}} 
bool \hyperlink{classsc2_1_1_coordinator_a31058950f418aa5d488fbda684c02146}{All\+Games\+Ended} () const
\begin{DoxyCompactList}\small\item\em Returns true if all running games have ended. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classsc2_1_1_coordinator_a86987e853e780259867996f4350e3a87}\label{classsc2_1_1_coordinator_a86987e853e780259867996f4350e3a87}} 
bool \hyperlink{classsc2_1_1_coordinator_a86987e853e780259867996f4350e3a87}{Set\+Replay\+Path} (const std\+::string \&path)
\begin{DoxyCompactList}\small\item\em Sets the path for to a folder of replays to analyze. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classsc2_1_1_coordinator_a4c4f1b394633b6379aa65bfc264d6f74}\label{classsc2_1_1_coordinator_a4c4f1b394633b6379aa65bfc264d6f74}} 
bool \hyperlink{classsc2_1_1_coordinator_a4c4f1b394633b6379aa65bfc264d6f74}{Load\+Replay\+List} (const std\+::string \&file\+\_\+path)
\begin{DoxyCompactList}\small\item\em Loads replays from a file. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classsc2_1_1_coordinator_a063c9a9f2d31bc48fb2d4db0aaa7d791}\label{classsc2_1_1_coordinator_a063c9a9f2d31bc48fb2d4db0aaa7d791}} 
void \hyperlink{classsc2_1_1_coordinator_a063c9a9f2d31bc48fb2d4db0aaa7d791}{Save\+Replay\+List} (const std\+::string \&file\+\_\+path)
\begin{DoxyCompactList}\small\item\em Saves replays to a file. \end{DoxyCompactList}\item 
bool \hyperlink{classsc2_1_1_coordinator_a451a422eb904f69b55b273ddfe3f0e58}{Has\+Replays} () const
\item 
\mbox{\Hypertarget{classsc2_1_1_coordinator_a177f926215050e4d249df208b03a387d}\label{classsc2_1_1_coordinator_a177f926215050e4d249df208b03a387d}} 
void \hyperlink{classsc2_1_1_coordinator_a177f926215050e4d249df208b03a387d}{Wait\+For\+All\+Responses} ()
\begin{DoxyCompactList}\small\item\em Blocks for all bots to receive any pending responses. \end{DoxyCompactList}\item 
bool \hyperlink{classsc2_1_1_coordinator_abddb83c4a267e3592932da7d198a97d5}{Remote\+Save\+Map} (const void $\ast$data, int data\+\_\+size, std\+::string remote\+\_\+path)
\begin{DoxyCompactList}\small\item\em Saves a binary blob as a map to a remote location. \end{DoxyCompactList}\item 
std\+::string \hyperlink{classsc2_1_1_coordinator_a9f256d8cc391acd89a29e4369112d69b}{Get\+Exe\+Path} () const
\end{DoxyCompactItemize}


\subsection{Detailed Description}
\hyperlink{classsc2_1_1_coordinator}{Coordinator} of one or more clients. Used to start, step and stop games and replays. 

\subsection{Member Function Documentation}
\mbox{\Hypertarget{classsc2_1_1_coordinator_a9f256d8cc391acd89a29e4369112d69b}\label{classsc2_1_1_coordinator_a9f256d8cc391acd89a29e4369112d69b}} 
\index{sc2\+::\+Coordinator@{sc2\+::\+Coordinator}!Get\+Exe\+Path@{Get\+Exe\+Path}}
\index{Get\+Exe\+Path@{Get\+Exe\+Path}!sc2\+::\+Coordinator@{sc2\+::\+Coordinator}}
\subsubsection{\texorpdfstring{Get\+Exe\+Path()}{GetExePath()}}
{\footnotesize\ttfamily std\+::string sc2\+::\+Coordinator\+::\+Get\+Exe\+Path (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}

Gets the game executable path. \begin{DoxyReturn}{Returns}
The game executable path. 
\end{DoxyReturn}
\mbox{\Hypertarget{classsc2_1_1_coordinator_a451a422eb904f69b55b273ddfe3f0e58}\label{classsc2_1_1_coordinator_a451a422eb904f69b55b273ddfe3f0e58}} 
\index{sc2\+::\+Coordinator@{sc2\+::\+Coordinator}!Has\+Replays@{Has\+Replays}}
\index{Has\+Replays@{Has\+Replays}!sc2\+::\+Coordinator@{sc2\+::\+Coordinator}}
\subsubsection{\texorpdfstring{Has\+Replays()}{HasReplays()}}
{\footnotesize\ttfamily bool sc2\+::\+Coordinator\+::\+Has\+Replays (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}

Determines if there are unprocessed replays. \begin{DoxyReturn}{Returns}
Is true if there are replays left. 
\end{DoxyReturn}
\mbox{\Hypertarget{classsc2_1_1_coordinator_ada059b9a60d901be047ef33ce612c5d2}\label{classsc2_1_1_coordinator_ada059b9a60d901be047ef33ce612c5d2}} 
\index{sc2\+::\+Coordinator@{sc2\+::\+Coordinator}!Load\+Settings@{Load\+Settings}}
\index{Load\+Settings@{Load\+Settings}!sc2\+::\+Coordinator@{sc2\+::\+Coordinator}}
\subsubsection{\texorpdfstring{Load\+Settings()}{LoadSettings()}}
{\footnotesize\ttfamily bool sc2\+::\+Coordinator\+::\+Load\+Settings (\begin{DoxyParamCaption}\item[{int}]{argc,  }\item[{char $\ast$$\ast$}]{argv }\end{DoxyParamCaption})}

Used to load settings. Settings will be discovered in the following order\+:
\begin{DoxyEnumerate}
\item If command line arguments are provided it will use them. Invoke binary with --help to see expected arguments.
\item (Recommended) If the Star\+Craft II binary has been run the function will auto discover its location. 
\begin{DoxyParams}{Parameters}
{\em argc} & Provided in main signature. \\
\hline
{\em argv} & Provided in main signature. \\
\hline
{\em game\+\_\+settings} & The name of the settings file. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
True if settings were found or discovered, false otherwise. 
\end{DoxyReturn}

\end{DoxyEnumerate}\mbox{\Hypertarget{classsc2_1_1_coordinator_abddb83c4a267e3592932da7d198a97d5}\label{classsc2_1_1_coordinator_abddb83c4a267e3592932da7d198a97d5}} 
\index{sc2\+::\+Coordinator@{sc2\+::\+Coordinator}!Remote\+Save\+Map@{Remote\+Save\+Map}}
\index{Remote\+Save\+Map@{Remote\+Save\+Map}!sc2\+::\+Coordinator@{sc2\+::\+Coordinator}}
\subsubsection{\texorpdfstring{Remote\+Save\+Map()}{RemoteSaveMap()}}
{\footnotesize\ttfamily bool sc2\+::\+Coordinator\+::\+Remote\+Save\+Map (\begin{DoxyParamCaption}\item[{const void $\ast$}]{data,  }\item[{int}]{data\+\_\+size,  }\item[{std\+::string}]{remote\+\_\+path }\end{DoxyParamCaption})}



Saves a binary blob as a map to a remote location. 

$<$ \begin{DoxyReturn}{Returns}
Is true if the save is successful. 
\end{DoxyReturn}
\mbox{\Hypertarget{classsc2_1_1_coordinator_ac4071b2072ce3120b135c37c7e7587d1}\label{classsc2_1_1_coordinator_ac4071b2072ce3120b135c37c7e7587d1}} 
\index{sc2\+::\+Coordinator@{sc2\+::\+Coordinator}!Set\+Data\+Version@{Set\+Data\+Version}}
\index{Set\+Data\+Version@{Set\+Data\+Version}!sc2\+::\+Coordinator@{sc2\+::\+Coordinator}}
\subsubsection{\texorpdfstring{Set\+Data\+Version()}{SetDataVersion()}}
{\footnotesize\ttfamily void sc2\+::\+Coordinator\+::\+Set\+Data\+Version (\begin{DoxyParamCaption}\item[{const std\+::string \&}]{version }\end{DoxyParamCaption})}

Set the correct data version of a replay to allow faster replay loading. Saves a few seconds if replay is not up to date. Works only in combination with correct process path set by \char`\"{}\+Set\+Process\+Path\char`\"{}. 
\begin{DoxyParams}{Parameters}
{\em version} & Look in \char`\"{}protocol/buildinfo/versions.\+json\char`\"{} for the property \char`\"{}data-\/hash\char`\"{}. Or read it from \char`\"{}\+Replay\+Info.\+data\+\_\+version\char`\"{}. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classsc2_1_1_coordinator_ab46aec5712f6ec8ef12b03854f6e0495}\label{classsc2_1_1_coordinator_ab46aec5712f6ec8ef12b03854f6e0495}} 
\index{sc2\+::\+Coordinator@{sc2\+::\+Coordinator}!Set\+Feature\+Layers@{Set\+Feature\+Layers}}
\index{Set\+Feature\+Layers@{Set\+Feature\+Layers}!sc2\+::\+Coordinator@{sc2\+::\+Coordinator}}
\subsubsection{\texorpdfstring{Set\+Feature\+Layers()}{SetFeatureLayers()}}
{\footnotesize\ttfamily void sc2\+::\+Coordinator\+::\+Set\+Feature\+Layers (\begin{DoxyParamCaption}\item[{const \hyperlink{structsc2_1_1_feature_layer_settings}{Feature\+Layer\+Settings} \&}]{settings }\end{DoxyParamCaption})}

Indicates whether feature layers should be provided in the observation. 
\begin{DoxyParams}{Parameters}
{\em settings} & Configuration of feature layer settings. \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{structsc2_1_1_feature_layer_settings}{Feature\+Layer\+Settings} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{classsc2_1_1_coordinator_a555587bc85ac437711d15b569c75181a}\label{classsc2_1_1_coordinator_a555587bc85ac437711d15b569c75181a}} 
\index{sc2\+::\+Coordinator@{sc2\+::\+Coordinator}!Set\+Multithreaded@{Set\+Multithreaded}}
\index{Set\+Multithreaded@{Set\+Multithreaded}!sc2\+::\+Coordinator@{sc2\+::\+Coordinator}}
\subsubsection{\texorpdfstring{Set\+Multithreaded()}{SetMultithreaded()}}
{\footnotesize\ttfamily void sc2\+::\+Coordinator\+::\+Set\+Multithreaded (\begin{DoxyParamCaption}\item[{bool}]{value }\end{DoxyParamCaption})}

Specifies whether bots or replays On\+Step function should be run in parallel. If set to true make sure your bots are thread-\/safe if they reach into shared code. 
\begin{DoxyParams}{Parameters}
{\em value} & True to multithread, false otherwise. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classsc2_1_1_coordinator_aaad48921bac2f4f84471de5e9cff75d5}\label{classsc2_1_1_coordinator_aaad48921bac2f4f84471de5e9cff75d5}} 
\index{sc2\+::\+Coordinator@{sc2\+::\+Coordinator}!Set\+Port\+Start@{Set\+Port\+Start}}
\index{Set\+Port\+Start@{Set\+Port\+Start}!sc2\+::\+Coordinator@{sc2\+::\+Coordinator}}
\subsubsection{\texorpdfstring{Set\+Port\+Start()}{SetPortStart()}}
{\footnotesize\ttfamily void sc2\+::\+Coordinator\+::\+Set\+Port\+Start (\begin{DoxyParamCaption}\item[{int}]{port\+\_\+start }\end{DoxyParamCaption})}

Sets the first port number to use. Subsequent port assignments are sequential. 
\begin{DoxyParams}{Parameters}
{\em port\+\_\+start} & First port number. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classsc2_1_1_coordinator_ad906656238e13a8bab21c46f50aecc3d}\label{classsc2_1_1_coordinator_ad906656238e13a8bab21c46f50aecc3d}} 
\index{sc2\+::\+Coordinator@{sc2\+::\+Coordinator}!Set\+Process\+Path@{Set\+Process\+Path}}
\index{Set\+Process\+Path@{Set\+Process\+Path}!sc2\+::\+Coordinator@{sc2\+::\+Coordinator}}
\subsubsection{\texorpdfstring{Set\+Process\+Path()}{SetProcessPath()}}
{\footnotesize\ttfamily void sc2\+::\+Coordinator\+::\+Set\+Process\+Path (\begin{DoxyParamCaption}\item[{const std\+::string \&}]{path }\end{DoxyParamCaption})}

Sets the path to the Star\+Craft II binary. 
\begin{DoxyParams}{Parameters}
{\em path} & Absolute file path. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classsc2_1_1_coordinator_a602e6ead93e360771ce36d6ac782fc2a}\label{classsc2_1_1_coordinator_a602e6ead93e360771ce36d6ac782fc2a}} 
\index{sc2\+::\+Coordinator@{sc2\+::\+Coordinator}!Set\+Realtime@{Set\+Realtime}}
\index{Set\+Realtime@{Set\+Realtime}!sc2\+::\+Coordinator@{sc2\+::\+Coordinator}}
\subsubsection{\texorpdfstring{Set\+Realtime()}{SetRealtime()}}
{\footnotesize\ttfamily void sc2\+::\+Coordinator\+::\+Set\+Realtime (\begin{DoxyParamCaption}\item[{bool}]{value }\end{DoxyParamCaption})}

Specifies whether the game should run in realtime or not. If the game is running in real time that means the coordinator is not stepping it forward. The game is running and your bot reaches into it asynchronously to read state. 
\begin{DoxyParams}{Parameters}
{\em value} & True to be realtime, false otherwise. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classsc2_1_1_coordinator_ace8a0630c6b61d28e81c94bbebad3d7d}\label{classsc2_1_1_coordinator_ace8a0630c6b61d28e81c94bbebad3d7d}} 
\index{sc2\+::\+Coordinator@{sc2\+::\+Coordinator}!Set\+Render@{Set\+Render}}
\index{Set\+Render@{Set\+Render}!sc2\+::\+Coordinator@{sc2\+::\+Coordinator}}
\subsubsection{\texorpdfstring{Set\+Render()}{SetRender()}}
{\footnotesize\ttfamily void sc2\+::\+Coordinator\+::\+Set\+Render (\begin{DoxyParamCaption}\item[{const \hyperlink{structsc2_1_1_render_settings}{Render\+Settings} \&}]{settings }\end{DoxyParamCaption})}

\begin{DoxySeeAlso}{See also}
\hyperlink{structsc2_1_1_render_settings}{Render\+Settings} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{classsc2_1_1_coordinator_a7cea718f571effbe25b771315628c685}\label{classsc2_1_1_coordinator_a7cea718f571effbe25b771315628c685}} 
\index{sc2\+::\+Coordinator@{sc2\+::\+Coordinator}!Set\+Step\+Size@{Set\+Step\+Size}}
\index{Set\+Step\+Size@{Set\+Step\+Size}!sc2\+::\+Coordinator@{sc2\+::\+Coordinator}}
\subsubsection{\texorpdfstring{Set\+Step\+Size()}{SetStepSize()}}
{\footnotesize\ttfamily void sc2\+::\+Coordinator\+::\+Set\+Step\+Size (\begin{DoxyParamCaption}\item[{int}]{step\+\_\+size }\end{DoxyParamCaption})}

Sets the number of game loops to run for each step. 
\begin{DoxyParams}{Parameters}
{\em step\+\_\+size} & Number of gameloops to run for each step. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classsc2_1_1_coordinator_aadbfd927d66314a4eb949b2de2ae37b4}\label{classsc2_1_1_coordinator_aadbfd927d66314a4eb949b2de2ae37b4}} 
\index{sc2\+::\+Coordinator@{sc2\+::\+Coordinator}!Set\+Timeout\+MS@{Set\+Timeout\+MS}}
\index{Set\+Timeout\+MS@{Set\+Timeout\+MS}!sc2\+::\+Coordinator@{sc2\+::\+Coordinator}}
\subsubsection{\texorpdfstring{Set\+Timeout\+M\+S()}{SetTimeoutMS()}}
{\footnotesize\ttfamily void sc2\+::\+Coordinator\+::\+Set\+Timeout\+MS (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{timeout\+\_\+ms = {\ttfamily kDefaultProtoInterfaceTimeout} }\end{DoxyParamCaption})}

Sets the timeout for network operations. 
\begin{DoxyParams}{Parameters}
{\em value} & timeout\+\_\+ms in milliseconds. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classsc2_1_1_coordinator_a8aedd93ba1d7eb9e81b37b34ff76147c}\label{classsc2_1_1_coordinator_a8aedd93ba1d7eb9e81b37b34ff76147c}} 
\index{sc2\+::\+Coordinator@{sc2\+::\+Coordinator}!Set\+Use\+Generalized\+Ability\+Id@{Set\+Use\+Generalized\+Ability\+Id}}
\index{Set\+Use\+Generalized\+Ability\+Id@{Set\+Use\+Generalized\+Ability\+Id}!sc2\+::\+Coordinator@{sc2\+::\+Coordinator}}
\subsubsection{\texorpdfstring{Set\+Use\+Generalized\+Ability\+Id()}{SetUseGeneralizedAbilityId()}}
{\footnotesize\ttfamily void sc2\+::\+Coordinator\+::\+Set\+Use\+Generalized\+Ability\+Id (\begin{DoxyParamCaption}\item[{bool}]{value }\end{DoxyParamCaption})}

Uses generalized abilities where possible. Example\+: B\+U\+I\+L\+D\+\_\+\+T\+E\+C\+H\+L\+A\+B\+\_\+\+B\+A\+R\+R\+A\+C\+KS, B\+U\+I\+L\+D\+\_\+\+T\+E\+C\+H\+L\+A\+B\+\_\+\+F\+A\+C\+T\+O\+RY, B\+U\+I\+L\+D\+\_\+\+T\+E\+C\+H\+L\+A\+B\+\_\+\+S\+T\+A\+R\+P\+O\+RT ability ids are generalized to B\+U\+I\+L\+D\+\_\+\+T\+E\+C\+H\+L\+AB ability id in the observation. \mbox{\Hypertarget{classsc2_1_1_coordinator_a6e372788e11c3916fdf1982eb2e55511}\label{classsc2_1_1_coordinator_a6e372788e11c3916fdf1982eb2e55511}} 
\index{sc2\+::\+Coordinator@{sc2\+::\+Coordinator}!Set\+Window\+Location@{Set\+Window\+Location}}
\index{Set\+Window\+Location@{Set\+Window\+Location}!sc2\+::\+Coordinator@{sc2\+::\+Coordinator}}
\subsubsection{\texorpdfstring{Set\+Window\+Location()}{SetWindowLocation()}}
{\footnotesize\ttfamily void sc2\+::\+Coordinator\+::\+Set\+Window\+Location (\begin{DoxyParamCaption}\item[{int}]{x,  }\item[{int}]{y }\end{DoxyParamCaption})}

Sets the game window location. 
\begin{DoxyParams}{Parameters}
{\em x} & X position of game window. \\
\hline
{\em y} & y position of game window. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classsc2_1_1_coordinator_a9b0eca71a6f7575f35d1dd5c3e5d73cf}\label{classsc2_1_1_coordinator_a9b0eca71a6f7575f35d1dd5c3e5d73cf}} 
\index{sc2\+::\+Coordinator@{sc2\+::\+Coordinator}!Set\+Window\+Size@{Set\+Window\+Size}}
\index{Set\+Window\+Size@{Set\+Window\+Size}!sc2\+::\+Coordinator@{sc2\+::\+Coordinator}}
\subsubsection{\texorpdfstring{Set\+Window\+Size()}{SetWindowSize()}}
{\footnotesize\ttfamily void sc2\+::\+Coordinator\+::\+Set\+Window\+Size (\begin{DoxyParamCaption}\item[{int}]{width,  }\item[{int}]{height }\end{DoxyParamCaption})}

Sets the game window dimensions. 
\begin{DoxyParams}{Parameters}
{\em width} & Width of game window. \\
\hline
{\em height} & Height of game window. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classsc2_1_1_coordinator_a32ea6e639a39ec1fc813dffa2993d5b1}\label{classsc2_1_1_coordinator_a32ea6e639a39ec1fc813dffa2993d5b1}} 
\index{sc2\+::\+Coordinator@{sc2\+::\+Coordinator}!Start\+Game@{Start\+Game}}
\index{Start\+Game@{Start\+Game}!sc2\+::\+Coordinator@{sc2\+::\+Coordinator}}
\subsubsection{\texorpdfstring{Start\+Game()}{StartGame()}}
{\footnotesize\ttfamily bool sc2\+::\+Coordinator\+::\+Start\+Game (\begin{DoxyParamCaption}\item[{const std\+::string \&}]{map\+\_\+path = {\ttfamily std\+:\+:string()} }\end{DoxyParamCaption})}

Starts a game on a certain map. There are multiple ways to specify a map\+: Absolute path\+: Any .S\+C2\+Map file. Relative path\+: Any .S\+C2\+Map file relative to either the library or installation maps folder. Map name\+: Any Battle\+Net published map that has been locally cached. 
\begin{DoxyParams}{Parameters}
{\em map\+\_\+path} & Path to the map to run. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
True if the game started, false if there was errors or the game didn\textquotesingle{}t start, override On\+Error callback to see the exact errors. 
\end{DoxyReturn}
\mbox{\Hypertarget{classsc2_1_1_coordinator_af70ba5246f9d447eb8a69cd76d364eee}\label{classsc2_1_1_coordinator_af70ba5246f9d447eb8a69cd76d364eee}} 
\index{sc2\+::\+Coordinator@{sc2\+::\+Coordinator}!Update@{Update}}
\index{Update@{Update}!sc2\+::\+Coordinator@{sc2\+::\+Coordinator}}
\subsubsection{\texorpdfstring{Update()}{Update()}}
{\footnotesize\ttfamily bool sc2\+::\+Coordinator\+::\+Update (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

Helper function used to actually run a bot. This function will behave differently in real-\/time compared to non real-\/time. In real-\/time there is no step sent over the wire but instead will request and read observations as the game runs.
\begin{DoxyItemize}
\item For non-\/real time Update will perform the following\+:
\begin{DoxyEnumerate}
\item Step the simulation forward by a certain amount of game steps, this essentially moves the game loops forward.
\item Wait for the step to complete, the step is completed when a response is received and read from the Star\+Craft II binary.
\begin{DoxyItemize}
\item When the step is completed an Observation has been received. It is parsed and various client events are dispatched.
\end{DoxyItemize}
\item Call the user\textquotesingle{}s On\+Step function.
\end{DoxyEnumerate}
\item Real time applications will perform the following\+:
\begin{DoxyEnumerate}
\item The Observation is directly requested. The process will block while waiting for it.
\item The Observation is parsed and client events are dispatched.
\item \hyperlink{classsc2_1_1_unit}{Unit} actions batched from the \hyperlink{classsc2_1_1_action_interface}{Action\+Interface} are dispatched. \begin{DoxyReturn}{Returns}
False if the game has ended, true otherwise. 
\end{DoxyReturn}

\end{DoxyEnumerate}
\end{DoxyItemize}

The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
include/sc2api/\hyperlink{sc2__coordinator_8h}{sc2\+\_\+coordinator.\+h}\end{DoxyCompactItemize}
